﻿using Swimj.DomainLib.Entities;

namespace Production.DomainLib.AggregatesModel.TechnologyAggregate
{
    public class TechnologyDetail : AuditableEntity<int>
    {
        /// <summary>
        /// 工序标识
        /// </summary>
        public int ProcessId { get; set; }

        /// <summary>
        /// 工序编码
        /// </summary>
        public string? ProcessCode { get; set; }

        /// <summary>
        /// 工序名称
        /// </summary>
        public string? ProcessName { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 耗时
        /// </summary>
        public double TakeTime { get; set; }

        public TechnologyDetail()
        {
        }

        public TechnologyDetail(int processId, string? processCode, string? processName, int sort, double takeTime) :
            this()
        {
            ProcessId = processId;
            ProcessCode = processCode;
            ProcessName = processName;
            Sort = sort;
            TakeTime = takeTime;
        }

        public void Update(int processId, string? processCode, string? processName, int sort, double takeTime)
        {
            ProcessId = processId;
            ProcessCode = processCode;
            ProcessName = processName;
            Sort = sort;
            TakeTime = takeTime;
        }
    }
}